<template>
	<gui-page>
		<template v-slot:gBody>
			<gui-a-header :title="title"></gui-a-header>
			<view class="con flex-dc-ac">
				<image class="success" src="../../static/else/success.png" mode="widthFix" style="height: auto;">
				</image>
				<text class="gui-bold">{{content}}</text>
				<view class="saveBtn f32" v-if="showBtn" @click="$u.back()">{{btnTxt}}</view>
			</view>
		</template>
	</gui-page>
</template>

<script setup>
	import {
		ref,
		reactive,
		inject
	} from 'vue'
	const title = ref('登记成功')
	const content = ref('投递成功，请耐心等待平台审核…')
	const btnTxt = ref('返回我的招聘会')
	const $u = reactive(inject('$u'))
	import {
		onLoad
	} from '@dcloudio/uni-app'
	
	const successType = ref(0)
	const showBtn = ref(true)
	
	onLoad((option) => {
		if (option.type) {
			successType.value = option.type
			if(successType.value == 1) {
				title.value = "投递成功";
				content.value = "投递成功，请耐心等待平台审核…";
				btnTxt.value = "返回"
			}else if(successType.value == 2) {
				title.value = "报名成功";
				content.value = "请耐心等待平台审核…";
				btnTxt.value = "返回"
			}
		}
	})
</script>

<style lang="scss">
	.con {
		padding: 168rpx 48rpx 0 48rpx;

		.success {
			width: 300rpx;
			margin-bottom: 75rpx;
		}

		.saveBtn {
			width: 100%;
			margin-top: 92rpx;
		}
	}
</style>